//
//  TipView.m
//  YinHang
//
//  Created by 张亚哲 on 14/10/28.
//  Copyright (c) 2014年 孙彦鹏. All rights reserved.
//

#import "TipView.h"

@implementation TipView{
    
    __weak IBOutlet UIView *backView;
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [[NSBundle mainBundle] loadNibNamed:@"tip" owner:self options:nil];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/
-(id)initWithTitle:(NSString *)Title descriobe:(NSString *)describe introduce:(NSString *)introduce rect:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _TitleLabel.text = Title;
        _DescribeLabel.text = describe;
        _introduce.text = introduce;
        backView.layer.cornerRadius = 5.0;
        self.layer.cornerRadius = 5.0;
    }
    return self;
}

-(void)TipViewHidden{
    
}

- (IBAction)IBActionCancel:(UIButton *)sender {
    [_delegate cancel];
    NSLog(@"cancel");
}

- (IBAction)IBActionComfirm:(UIButton *)sender {
    [_delegate confirm];
    NSLog(@"comfirm");
}
@end
